package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StreetCommunityMapper;
import com.ruoyi.system.domain.StreetCommunity;
import com.ruoyi.system.service.IStreetCommunityService;

/**
 * 街道填报Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-22
 */
@Service
public class StreetCommunityServiceImpl implements IStreetCommunityService 
{
    @Autowired
    private StreetCommunityMapper streetCommunityMapper;

    /**
     * 查询street_community
     * 
     * @param id 街道填报主键
     * @return streetCommunity
     */
    @Override
    public StreetCommunity selectStreetCommunityById(String id)
    {
        return streetCommunityMapper.selectStreetCommunityById(id);
    }

    /**
     * 查询street_community列表
     * 
     * @param streetCommunity streetCommunity
     * @return streetCommunity
     */
    @Override
    public List<StreetCommunity> selectStreetCommunityList(StreetCommunity streetCommunity)
    {
        return streetCommunityMapper.selectStreetCommunityList(streetCommunity);
    }

    /**
     * 新增街道填报
     * 
     * @param streetCommunity streetCommunity
     * @return 结果
     */
    @Override
    public int insertStreetCommunity(StreetCommunity streetCommunity)
    {
        streetCommunity.setCreateTime(DateUtils.getNowDate());
        return streetCommunityMapper.insertStreetCommunity(streetCommunity);
    }

    /**
     * 修改街道填报
     * 
     * @param streetCommunity streetCommunity
     * @return 结果
     */
    @Override
    public int updateStreetCommunity(StreetCommunity streetCommunity)
    {
        streetCommunity.setUpdateTime(DateUtils.getNowDate());
        return streetCommunityMapper.updateStreetCommunity(streetCommunity);
    }

    /**
     * 批量删除街道填报
     * 
     * @param ids 需要删除的街道填报主键
     * @return 结果
     */
    @Override
    public int deleteStreetCommunityByIds(String[] ids)
    {
        return streetCommunityMapper.deleteStreetCommunityByIds(ids);
    }

    /**
     * 删除街道填报信息
     * 
     * @param id 街道填报主键
     * @return 结果
     */
    @Override
    public int deleteStreetCommunityById(String id)
    {
        return streetCommunityMapper.deleteStreetCommunityById(id);
    }
}
